package org.example.bean;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import org.example.util.StringUtil;

@Data
public class User {
    private String id;
    private String username;
    private String password;
    private String phone;
    private String email;
    private String address;
//    @TableLogic(delval = "0", value = "1")
    private String status;
    @TableField(fill = FieldFill.INSERT)
    private String createTime;
    @TableField(fill = FieldFill.UPDATE)
    private String updateTime;
    private Integer isDeleted;
    private Integer isAdmin;
    private Integer score;

    public void setPassword(String password) {
        this.password = StringUtil.encryptMD5(password);
    }
}
